<template>
    <div>

        <!-- <el-table :data="voteList"
                   @cell-click="toVoteDetail">
             <el-table-column
                 prop="name"
                 label="表决名称">
             </el-table-column>
         </el-table>-->
    </div>
</template>

<script>
    import util from 'assets/js/util.js'

    export default {
        data() {
            return {
                peopleName: '',
                activeIndex: '1',
                voteList: [],
                manual: true,
            }
        },
        methods: {

            toVoteDetail: function (row, column, cell, event) {
                if (row.type === 0) {
                    window.location.href = '../meeting/vote-over.html?' + 'voteId=' + row.id;   // 债权人委员会
                } else {
                    window.location.href = '../meeting/vote.html?' + 'voteId=' + row.id;
                }
            },

        },
        mounted() {

            const _self = this;
            util.ajax({
                url: '/vote/list',
                params: {meetingId: util.getUrlParam(document.location.href, 'meetingId')},
                success: function (data) {
                    data.data.forEach(_vote => _self.voteList.push({
                        id: _vote.id,
                        name: _vote.name,
                        state: _vote.state,
                        type: _vote.type
                    }));

                },
            });
        }
    }
</script>

<style scoped>

    div {
        /*   float: left;
           font-size: 15px;*/
        /*   margin: 10px auto;*/
    }

    button {
        font-size: 17px;
    }

    .time {
        float: right;
        margin-right: 10%;
    }

    .title {
        float: left;
        margin-left: 12%;
    }

</style>
